package com.zhe.zheblogmaster.mapper;


import com.zhe.zheblogmaster.entity.AdminUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author WHAOU
 */
@Repository
public interface AdminUserMapper {


    /**
     * 登录方法
     *
     * @param userName 用户名
     * @param password MD5加密后的密码
     * @return 若查询结果为null则登录失败，反之登录成功
     */
    AdminUser login(@Param("userName") String userName, @Param("password") String password);

    List<AdminUser> getUserInfo();

    AdminUser selectByPrimaryKey(Integer loginUserId);

    int updateByPrimaryKeySelective(AdminUser user);
}
